package com.example.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("interceptor")
public class InterceptorController {

    private final Logger logger = LoggerFactory.getLogger(InterceptorController.class);

    @GetMapping("/test")
    public String testInterceptor(){
        logger.info("我是controller方法");
        return "success";
    }

}
